extends Camera2D



func set_map(tilemap: TileMap):
	var rect = tilemap.get_used_rect()
	rect.position *= tilemap.cell_size
	rect.size *= tilemap.cell_size
	
	limit_left = rect.position.x + tilemap.position.x
	limit_top = rect.position.y + tilemap.position.y
	
	limit_right = rect.end.x + tilemap.position.x
	limit_bottom = rect.end.y + tilemap.position.y



